package com.example.photography.Activity.Edit;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.example.photography.R;
import com.example.photography.common.BaseActivity;
import com.example.photography.ui.CircleImageView;
import com.example.photography.util.Util;

import butterknife.BindView;
import butterknife.ButterKnife;


public class Edit_Information extends BaseActivity {


    @BindView(R.id.iv_back)
    ImageView ivBack;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.rl_title)
    RelativeLayout rlTitle;
    @BindView(R.id.cv_head)
    CircleImageView cvHead;
    @BindView(R.id.rl_head)
    RelativeLayout rlHead;
    @BindView(R.id.page1)
    LinearLayout page1;
    @BindView(R.id.rl_name)
    RelativeLayout rlName;
    @BindView(R.id.rl_id)
    RelativeLayout rlId;
    @BindView(R.id.rl_phone)
    RelativeLayout rlPhone;
    @BindView(R.id.rl_sex)
    RelativeLayout rlSex;
    @BindView(R.id.rl_site)
    RelativeLayout rlSite;
    @BindView(R.id.rl_identity)
    RelativeLayout rlIdentity;
    @BindView(R.id.rl_introduction)
    RelativeLayout rlIntroduction;
    @BindView(R.id.page2)
    LinearLayout page2;

    @Override
    protected void initData() {
        initView();


    }

    private void initView() {
        initListen();
        tvTitle.setText("编辑资料");

    }

    private void initListen() {
        ivBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                removeCurrentActivity();
            }
        });
        //头像
        rlHead.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Util.showToast(Edit_Information.this, "更换头像");
            }
        });
        //昵称
        rlName.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Util.showToast(Edit_Information.this, "更换昵称");
            }
        });
        //魅影号
        rlId.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Util.showToast(Edit_Information.this, "更换魅影号");
            }
        });
        //手机号
        rlPhone.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                goToActivity(Edit_phone.class, new Bundle());
            }
        });
        //性别
        rlSex.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                goToActivity(Edit_sex.class, new Bundle());
            }
        });
        //地点
        rlSite.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                goToActivity(Edit_site.class, new Bundle());
            }
        });
        //身份
        rlIdentity.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                goToActivity(Edit_identity.class, new Bundle());
            }
        });
        //个人简介
        rlIntroduction.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                goToActivity(Edit_introduction.class, new Bundle());
            }
        });
    }

    @Override
    protected int getLayoutId() {
        return R.layout.edit__information;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }
}
